<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MiniNote - 登录/注册</title>
    <link rel="stylesheet" href="css/style.css">
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <!-- <script>
        // 页面加载时自动跳转到notes.html
        window.onload = function() {
            window.location.href = 'notes.html';
        };
    </script> -->
</head>
<body>
    <div class="container">
        <div class="auth-container">
            <div class="tabs">
                <div class="tab active" data-tab="login">登录</div>
                <div class="tab" data-tab="register">注册</div>
            </div>
            
            <div class="form-container">
                <!-- 登录表单 -->
                <form id="login-form" class="form active">
                    <h2>用户登录</h2>
                    <div class="form-group">
                        <label for="login-username">用户名</label>
                        <input type="text" id="login-username" name="username" required>
                    </div>
                    <div class="form-group">
                        <label for="login-password">密码</label>
                        <input type="password" id="login-password" name="password" required>
                    </div>
                    <div class="form-group">
                        <button type="submit" class="btn btn-primary">登录</button>
                    </div>
                    <div id="login-message" class="message"></div>
                </form>
                
                <!-- 注册表单 -->
                <form id="register-form" class="form">
                    <h2>用户注册</h2>
                    <div class="form-group">
                        <label for="register-username">用户名</label>
                        <input type="text" id="register-username" name="username" required minlength="3" maxlength="50">
                        <small>用户名长度为3-50个字符</small>
                    </div>
                    <div class="form-group">
                        <label for="register-password">密码</label>
                        <input type="password" id="register-password" name="password" required minlength="6" maxlength="100">
                        <small>密码长度为6-100个字符</small>
                    </div>
                    <div class="form-group">
                        <button type="submit" class="btn btn-primary">注册</button>
                    </div>
                    <div id="register-message" class="message"></div>
                </form>
            </div>
        </div>
    </div>
    
    <script src="js/config.js"></script>
    <script src="js/auth.js"></script>
</body>
</html>
